package com.goldcn.user.dao;

import com.goldcn.user.dto.UserCountDto;
import com.goldcn.user.model.Count;
import com.goldcn.user.vo.CountVo;
import com.goldcn.user.vo.MainViewCountVo;
import com.goldcn.user.vo.UserCountVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CountMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Count record);

    int insertSelective(Count record);

    Count selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Count record);

    int updateByPrimaryKey(Count record);

    List<Count> selectAll(@Param(value = "companyID") Long companyID);

    CountVo selectCountByConditon(UserCountDto userCountDto);

    List<UserCountVo> selectGroupByBranchID(Map<String, Object> params);

    List<UserCountVo> selectGroupByTwoLevelBranchID(Map<String, Object> params);

    List<UserCountVo> selectGroupBySubbranchID(Map<String, Object> params);

    List<UserCountVo> selectGroupBySalesManagerID(Map<String, Object> params);

    int deleteByOID(Map<String, Object> params);

    int updateMemberCountQty(Long id);

    Long selectIDByConditon(UserCountDto userCountDto);

    List<MainViewCountVo> getMainViewCountVo(Long nowDay);

    List<Map<String,Object>> getTwoAddCount(Long nowDay);

    List<Map<String,Object>> getSubAddCount(Long nowDay);

    List<Map<String,Object>> getSaleManagerAddCount(Long nowDay);
}